package version2;

import java.awt.Color;
import java.util.ArrayList;
import java.util.Scanner;

import javax.media.j3d.Appearance;
import javax.media.j3d.ColoringAttributes;
import javax.vecmath.Color3f;

public class Dense 
{
	int sliceNumber;
	float sliceWidth;
	ArrayList<int[]> coordinates;
	Color3f color;
	Appearance app;
	
	public Dense(String xValues, String yValues, int slice, float sliceW)
	{
		sliceNumber = slice;
		sliceWidth = sliceW;
		coordinates = new ArrayList<int[]>();
		
		Scanner xScan = new Scanner(xValues);
		Scanner yScan = new Scanner(yValues);
		
		int x;
		int y;
		
		while(xScan.hasNext() && yScan.hasNext())
		{
			int[] pair = new int[3];
			x = xScan.nextInt();
			y = yScan.nextInt();
			pair[0] = x;
			pair[1] = y;
			pair[2] = (int) (slice * sliceW);
			coordinates.add(pair);
		}
		
		color = new Color3f(Color.PINK);
		ColoringAttributes ca = new ColoringAttributes(color, ColoringAttributes.FASTEST);
		app = new Appearance();
		app.setColoringAttributes(ca);
	}
}
